home *** CD-ROM | disk | FTP | other *** search
/ Info-Mac 4 / Info_Mac IV CD-ROM (Pacific HiTech Inc.)(August 1994).iso / Development / Source / POVSRC / SOURCE / PopupMenu.h < prev    next >
Text File  |  1994-02-04  |  3KB  |  94 lines

  1. /*==============================================================================
  2. Project:    POV-Ray
  3.  
  4. Version:    2.2
  5.  
  6. File:        PopupMenu.h
  7.  
  8. Description:
  9. Routines to handle pop-up menus in dialogs.
  10.  
  11. ------------------------------------------------------------------------------
  12. Author:
  13.     Eduard [esp] Schwan
  14. ------------------------------------------------------------------------------
  15.     from Persistence of Vision Raytracer
  16.     Copyright 1993 Persistence of Vision Team
  17. ------------------------------------------------------------------------------
  18.     NOTICE: This source code file is provided so that users may experiment
  19.     with enhancements to POV-Ray and to port the software to platforms other 
  20.     than those supported by the POV-Ray Team.  There are strict rules under
  21.     which you are permitted to use this file.  The rules are in the file
  22.     named POVLEGAL.DOC which should be distributed with this file. If 
  23.     POVLEGAL.DOC is not available or for more info please contact the POV-Ray
  24.     Team Coordinator by leaving a message in CompuServe's Graphics Developer's
  25.     Forum.  The latest version of POV-Ray may be found there as well.
  26.  
  27.     This program is based on the popular DKB raytracer version 2.12.
  28.     DKBTrace was originally written by David K. Buck.
  29.     DKBTrace Ver 2.0-2.12 were written by David K. Buck & Aaron A. Collins.
  30. ------------------------------------------------------------------------------
  31. More Info:
  32.     This Macintosh version of POV-Ray was created and compiled by Jim Nitchals
  33.     (Think 5.0) and Eduard Schwan (MPW 3.2), based (loosely) on the original
  34.     port by Thomas Okken and David Lichtman, with some help from Glenn Sugden.
  35.  
  36.     For bug reports regarding the Macintosh version, you should contact:
  37.     Eduard [esp] Schwan
  38.         CompuServe: 71513,2161
  39.         Internet: jl.tech@applelink.apple.com
  40.         AppleLink: jl.tech
  41.     Jim Nitchals
  42.         Compuserve: 73117,3020
  43.         America Online: JIMN8
  44.         Internet: jimn8@aol.com -or- jimn8@applelink.apple.com
  45.         AppleLink: JIMN8
  46. ------------------------------------------------------------------------------
  47. Change History:
  48.     930228    [esp]    Created
  49.     930611    [esp]    Radical rewrite to allow multiple popups in a dialog
  50.     931001    [esp]    version 2.0 finished (Released on 10/4/93)
  51. ==============================================================================*/
  52.  
  53. #if !defined(POPUPMENU_H)
  54. #define POPUPMENU_H
  55.  
  56.  
  57. #include <menus.h>        // MenuHandle
  58. #include <dialogs.h>    // DialogPtr
  59.  
  60.  
  61. // =====================================================================
  62.  
  63. typedef struct
  64. {
  65.     Handle            fNext;            // next item on list
  66.     // You must fill these in...
  67.     DialogPtr        fParentDialog;    // our dialog
  68.     short            fMenuID;        // our popUp menu ID
  69.     short            fPopupItemID;    // our popUp dialog user item ID
  70.     short            fLastChoice;    // the last-chosen item from the pop-up menu
  71.     // AddPopupToList will fill in the rest
  72.     Rect            fTitleBounds;    // bounding box of popup menu title
  73.     Rect            fPopupBounds;    // bounding box of popup menu itself
  74.     MenuHandle        fMenuHandle;    // our popUp menu
  75. } popupRec_t, *popupRecPtr_t, **popupRecHdl_t;
  76.  
  77.  
  78. // =====================================================================
  79.  
  80. void InitPopups(void);
  81.  
  82. Boolean PopupsExist(void);
  83.  
  84. void AddPopupToList(popupRecPtr_t newPopupRecP);
  85.  
  86. short GetPopupValue(short pPopupItemID);
  87.  
  88. void KillPopups(void);
  89.  
  90. pascal Boolean PopupMouseDnDlgFilterProc(DialogPtr pDialogPtr, EventRecord *pEventPtr, short *pItemHitPtr);
  91.  
  92.  
  93. #endif // POPUPMENU_H
  94.